<script>
  var i = sum = 0;
  while (i <= 100) {
    if (i % 2) {
      sum += i;
    }
    i++;
  }
  console.log('100以内奇数的和：' + sum);
</script>
<p>
  <a href="file:///C:/Users/rise/Desktop/%E9%A6%96%E9%A1%B5/default/02.html">返回</a>
</p>